﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Bridge.EFCoreMigration.Shared.Migrations.Wms
{
    /// <inheritdoc />
    public partial class wmsinit02 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "OutDeptName",
                table: "t_allotvoucher",
                type: "varchar(200)",
                maxLength: 200,
                nullable: true,
                comment: "调出科室名称",
                oldClrType: typeof(string),
                oldType: "varchar(50)",
                oldMaxLength: 50,
                oldNullable: true,
                oldComment: "调出科室名称")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "InDeptName",
                table: "t_allotvoucher",
                type: "varchar(200)",
                maxLength: 200,
                nullable: true,
                comment: "调入科室名称",
                oldClrType: typeof(string),
                oldType: "varchar(50)",
                oldMaxLength: 50,
                oldNullable: true,
                oldComment: "调入科室名称")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "ProductClassId",
                table: "t_agencyproduct",
                type: "char(100)",
                maxLength: 100,
                nullable: true,
                comment: "产品大类标识",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "产品大类标识")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "ManufactureId",
                table: "t_agencyproduct",
                type: "char(100)",
                maxLength: 100,
                nullable: false,
                comment: "生厂商标识",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(100)",
                oldMaxLength: 100,
                oldComment: "生厂商标识")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "OutDeptName",
                table: "t_allotvoucher",
                type: "varchar(50)",
                maxLength: 50,
                nullable: true,
                comment: "调出科室名称",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200,
                oldNullable: true,
                oldComment: "调出科室名称")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "InDeptName",
                table: "t_allotvoucher",
                type: "varchar(50)",
                maxLength: 50,
                nullable: true,
                comment: "调入科室名称",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200,
                oldNullable: true,
                oldComment: "调入科室名称")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "ProductClassId",
                table: "t_agencyproduct",
                type: "char(100)",
                maxLength: 100,
                nullable: true,
                comment: "产品大类标识",
                oldClrType: typeof(Guid),
                oldType: "char(100)",
                oldMaxLength: 100,
                oldNullable: true,
                oldComment: "产品大类标识")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "ManufactureId",
                table: "t_agencyproduct",
                type: "char(100)",
                maxLength: 100,
                nullable: false,
                comment: "生厂商标识",
                oldClrType: typeof(Guid),
                oldType: "char(100)",
                oldMaxLength: 100,
                oldComment: "生厂商标识")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");
        }
    }
}
